package com.kuaiyin.dto;

import com.kuaiyin.enums.Status;
import com.kuaiyin.enums.TestPlanExecMode;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

@Data
@Schema(name = "TestPlanDTO", description = "测试计划数据传输对象")
public class TestPlanDTO  implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "计划ID(更新时必填，创建时无需填)")
    private Long id;

    @Schema(description = "计划名称（唯一）")
    @NotBlank(message = "计划名称不能为空")
    private String name;

    @Schema(description = "Cron表达式")
    private String scheduleConfig;

    @Schema(description = "状态：0-禁用 1-启用")
    private Status status;

    @Schema(description = "关联的用例列表")
    private List<TestPlanCaseDTO> cases;

    @Schema(description = "计划描述")
    private String description;

    @Schema(description = "执行模式：STOP_ON_FAIL-错误就停止 CONTINUE_ON_FAIL-错误继续执行")
    private TestPlanExecMode execMode;  // 使用枚举类型


}